using System;
using System.Text;

namespace ECCIT
{
	/// <summary>
	///		
	/// </summary>
	[Serializable]
	public class BaseError : Exception
	{
        public enum ErrorSource
        {
            Database,
        }

        public int? Code { get; set; }
        public ErrorSource Source { get; set; }
        public string Description{get;set;}

        public BaseError() { }

        public BaseError(int? code, ErrorSource source, string description)
        {
            this.Code = code;
            this.Source = source;
            this.Description = description;
        }

        public static BaseError CreateInstance(int? code, ErrorSource source, string description)
        {
            return new BaseError(code, source, description);
        }
	}
}
